package cn.com.dingtek.genius.manager.server.support;

import lombok.Getter;

import java.util.Arrays;
import java.util.Optional;

@Getter
public enum StaffAppType {
    /**
     *
     */
    TRASH_CAN_APP(1, "箱当好APP"),
    CAR_PARK_APP(2, "便捷停车APP"),
    SEWER_COVER_APP(3, "智慧井盖APP"),
    SIGNPOST_APP(4, "智慧指路牌APP");

    private int value;
    private String desc;

    StaffAppType(int value, String desc) {
        this.value = value;
        this.desc = desc;
    }

    public static Optional<StaffAppType> valueOf(Integer value) {
        return Arrays.stream(StaffAppType.values())
                .filter(item -> item.getValue() == value)
                .findFirst();
    }

    @Override
    public String toString() {
        return desc;
    }
}
